package cn.pugle.base;

/**
 * <p> Created by tzp on 2017/5/8.
 */
public class OverloadTest {
    public void func(A a) {
        System.out.println("func1 " + a);
    }

    public void func(B a) {
        System.out.println("func2 " + a);
    }

    public static void main(String[] args) {
        A a = new A();
        B b = new B();
        A x = new B();
        OverloadTest test = new OverloadTest();
        test.func(a);
        test.func(b);
        test.func(x);
    }

    static class A {
    }

    static class B extends A {

    }
}
